package com.troll.wanandroid.viewmodel

import androidx.lifecycle.rxLifeScope
import com.rxlife.coroutine.RxLifeScope
import com.troll.base.BaseViewModel
import com.troll.wanandroid.repo.HomeRepo

/**
 *
 * @Author:   TangPeng
 * @Time:     6/1/21
 * @Remark:
 */
class HomeViewModel : BaseViewModel() {
    private var homeRepo = HomeRepo()
    var liveArticle = homeRepo.liveArticle
    var liveBanner = homeRepo.liveBanner
    var liveError =homeRepo.liveError

    fun getArticle() {
        return homeRepo.getArticle(rxLifeScope)
    }

    fun getBanner() {
        return homeRepo.getBanner(rxLifeScope)
    }
}